<%
    Array.prototype.in_array = function(e)
    {
        for(i=0;i<this.length;i++)
        {
            if(this[i] == e)
                return true;
        }
        return false;
    }
%>
<% datas.forEach(function(data,index){%>

<% if(index==4||index==9){%>
<div style="float: left;text-align: center;">
    <%if(['mp4','flv'].in_array(data.Courseware_Name.split('.')[1].trim())){%>
    <img src="<%=url+(data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0]).split('.')[0]+'.jpg'%>" style="margin-bottom: 5px;width: 132px;height: 92px"><br>
    <span style="font-size:12px;font-family: '微软雅黑';">
        <a href="/player?addr=<%=data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0]%>" target="_blank"><%= data.Courseware_Name.split('.')[0].substr(0,9)%></a>
    </span>

    <%}else{%>
    <img src="/images/ppt_kejian.png" style="margin-bottom: 5px;width: 132px;height: 92px"><br>
    <span style="font-size:12px;font-family: '微软雅黑';">
        <a href="<%=url+(data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0])%>" target="_blank"><%= data.Courseware_Name.split('.')[0].substr(0,9)%></a>
    </span>

    <%}%>
</div>
<%}else{%>
<div style="float: left;text-align: center;margin-right: 20px;">

    <%if(['mp4','flv'].in_array(data.Courseware_Name.split('.')[1].trim())){%>
    <img src="<%=url+(data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0]).split('.')[0]+'.jpg'%>" style="margin-bottom: 5px;width: 132px;height: 92px"><br>
    <span style="font-size:12px;font-family: '微软雅黑';">
        <a style="cursor: pointer" href="/player?addr=<%=data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0]%>" target="_blank"><%= data.Courseware_Name.split('.')[0].substr(0,9)%></a>
    </span>
    <%}else{%>
    <img src="/images/ppt_kejian.png" style="margin-bottom: 5px;width: 132px;height: 92px"><br>
    <span style="font-size:12px;font-family: '微软雅黑';">
        <a href="<%=url+(data.Courseware_Path.split('~')[1]?data.Courseware_Path.split('~')[1]:data.Courseware_Path.split('~')[0])%>" target="_blank"><%= data.Courseware_Name.split('.')[0].substr(0,9)%></a>
    </span>
    <%}%>
</div>
<%}%>
<%})%>
